package com.meilai.project.mapper.personal.mission;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.meilai.project.dto.personal.mission.MissionOperatorSearchDTO;
import com.meilai.project.entity.personal.mission.MissionOperator;
import com.meilai.project.vo.personal.mission.MissionOperatorVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 张驰
 * @since 2022-03-24
 */
@Mapper
public interface MissionOperatorMapper extends BaseMapper<MissionOperator> {
    List<MissionOperatorVO> getTodoMissionList(Page<MissionOperatorVO>page, @Param("userId") Long userId, @Param("searchDTO")MissionOperatorSearchDTO dto);

    int updateMissionOperator(@Param("off_time")LocalDateTime off_time, @Param("complete") Integer complete, @Param("mission_ids") List<Long> mission_ids);

    int updateCompleteMemo(@Param("ids") List<Long> ids, @Param("complete_memo") String complete_memo, @Param("off_tip_at") LocalDateTime off_tip_at);

}
